package org.eiahe.hr.attendance.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.eiahe.hr.attendance.domain.SyncLog;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 同步日志视图对象 hr_sync_log
 *
 * @author zhangnn
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = SyncLog.class)
public class SyncLogVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 日志ID
     */
    @ExcelProperty(value = "日志ID")
    private Long logId;

    /**
     * 同步来源
     */
    @ExcelProperty(value = "同步来源")
    private String syncSource;

    /**
     * 同步类型
     */
    @ExcelProperty(value = "同步类型")
    private String syncType;

    /**
     * 同步开始时间
     */
    @ExcelProperty(value = "同步开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime syncStartTime;

    /**
     * 同步结束时间
     */
    @ExcelProperty(value = "同步结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime syncEndTime;

    /**
     * 总记录数
     */
    @ExcelProperty(value = "总记录数")
    private Integer totalCount;

    /**
     * 成功数
     */
    @ExcelProperty(value = "成功数")
    private Integer successCount;

    /**
     * 失败数
     */
    @ExcelProperty(value = "失败数")
    private Integer failCount;

    /**
     * 失败原因
     */
    @ExcelProperty(value = "失败原因")
    private String failReason;

    /**
     * 同步状态
     */
    @ExcelProperty(value = "同步状态")
    private String syncStatus;

    /**
     * 创建时间
     */
    @ExcelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
}
